<!DOCTYPE html>
<html layout:decorator="components/layout" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      xmlns:th="http://www.thymeleaf.org"
>
<head>
  <title>事务日志</title>
</head>
<body>
<div
  layout:fragment="content"
  id="app" v-cloak
>
  <div class="container">
    <div class="main_mode2">

      <div class="myHeader">
        <div class="myHeader-title">
          摘要
        </div>
      </div>

      <table class="el-table el-table--border" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="100px">
            在线用户
          </td>
          <td align="left">{{transactionLog.tLogActiveTotal}}个</td>
        </tr>
        <tr>
          <td width="100px">
            安全日志
          </td>
          <td align="left">{{transactionLog.tLogSecurityTotal}}条</td>
        </tr>
        <tr>
          <td width="100px">
            操作日志
          </td>
          <td align="left">{{transactionLog.tLogOperationTotal}}条</td>
        </tr>
        <tr>
          <td width="100px">
            系统日志
          </td>
          <td align="left">{{transactionLog.tLogSystemTotal}}条</td>
        </tr>
      </table>

    </div>

    <div class="main_mode2">
      <div class="myHeader">
        <div class="myHeader-title">
          <a href="javascript: forward('/security-log/admin_security_loginsessionlist')">最近5个活动登录</a>
        </div>
        <div class="myHeader-tool">
          <a href="javascript: forward('/security-log/admin_security_loginsessionlist')">&gt;&gt;更多</a>
        </div>
      </div>
      <!--内容-->
      <show-data-table
        :data="transactionLog.tLogActiveVoRecords"
        :columns="columns.tlogActiveVoColumns"
      >
        <template #sys_user_role_list="row">
          <div v-for="sysUserRole in row.row.sysUserRoleList">
            {{fieldFormatter.generator(sysRoleMap)(sysUserRole.roleId)}}
          </div>
        </template>
      </show-data-table>
    </div><!--main_mode2-->

    <div class="main_mode2">
      <div class="myHeader">
        <div class="myHeader-title">
          <a href="javascript: forward('/security-log/admin_security_securityloglist')">最近5条安全日志</a>
        </div>
        <div class="myHeader-tool">
          <a href="javascript: forward('/security-log/admin_security_securityloglist')">&gt;&gt;更多</a>
        </div>
      </div>
      <show-data-table
        :data="transactionLog.tLogSecurityVoRecords"
        :columns="columns.tlogSecurityVoColumns"
      >
        <template #sys_user_role_list="row">
          <div v-for="sysUserRole in row.row.sysUserRoleList">
            {{fieldFormatter.generator(sysRoleMap)(sysUserRole.roleId)}}
          </div>
        </template>
        <template #operating="scope">
			<span>
        <el-button size="mini" type="primary" @click.stop.prevent="() => tlogSecurityViewInfo(scope.row)">详情</el-button>
			</span>
        </template>
      </show-data-table>
    </div><!--main_mode2-->

    <div class="main_mode2">
      <div class="myHeader">
        <div class="myHeader-title">
          <a href="javascript: forward('/security-log/admin_security_auditloglist')">最近5条操作审核日志</a>
        </div>
        <div class="myHeader-tool">
          <a href="javascript: forward('/security-log/admin_security_auditloglist')">&gt;&gt;更多</a>
        </div>
      </div>
      <!--内容-->
      <show-data-table
        :data="transactionLog.tLogOperationVoRecords"
        :columns="columns.tlogOperationColumns"
      >
        <template #sys_user_role_list="row">
          <div v-for="sysUserRole in row.row.sysUserRoleList">
            {{fieldFormatter.generator(sysRoleMap)(sysUserRole.roleId)}}
          </div>
        </template>
        <template #operating="scope">
			<span>
        <el-button size="mini" type="primary"
                   @click.stop.prevent="() => tlogOperationViewInfo(scope.row)">详情</el-button>
			</span>
        </template>
      </show-data-table>
    </div><!--main_mode2-->

    <div class="main_mode2">
      <div class="myHeader">
        <div class="myHeader-title">
          <a href="javascript: forward('/security-log/admin_security_sysloglist')">最近5条系统日志</a>
        </div>
        <div class="myHeader-tool">
          <a href="javascript: forward('/security-log/admin_security_sysloglist')">&gt;&gt;更多</a>
        </div>
      </div>
      <!--内容-->
      <show-data-table
        :data="transactionLog.tLogSystemVoRecords"
        :columns="columns.tlogSystemVoColumns"
      >
        <template #level="scope">
        <span>
          <img :src="imgUrl(scope.row.level)" align="absmiddle">
          {{levelList[scope.row.level]}}
        </span>
        </template>

        <template #operating="scope">
			<span>
        <el-button size="mini" type="primary" @click.stop.prevent="() => tlogSystemViewInfo(scope.row)">详情</el-button>
			</span>
        </template>
      </show-data-table>
    </div><!--main_mode2-->


  </div>
</div>

<div layout:fragment="js">
  <script src="/static/js/module/tlog/component/onlyShowDataTable.js"></script>
  <script src="/static/js/module/tlog/model/TlogVo.js"></script>
  <script src="/static/js/module/tlog/model/TlogActive.js"></script>
  <script src="/static/js/module/tlog/model/TlogOperation.js"></script>
  <script src="/static/js/module/tlog/model/TlogSecurity.js"></script>
  <script src="/static/js/module/tlog/model/TlogSystem.js"></script>
  <script src="/static/js/module/tlog/api/transactionLogApi.js"></script>
  <script src="/static/js/module/tlog/api/tlogActiveApi.js"></script>
  <script src="/static/js/module/tlog/api/tlogOperationApi.js"></script>
  <script src="/static/js/module/tlog/api/tlogSecurityApi.js"></script>
  <script src="/static/js/module/tlog/api/tlogSystemApi.js"></script>
  <script src="/static/js/module/system-config/api/sysRoleApi.js"></script>
  <script src="/static/js/module/tlog/admin_security.js"></script>

</div>

</body>
</html>
